#!/bin/bash

recdir ()
{
	pre=$pre$singlepre
	for file in "$@" ; do
		echo -e $pre$verdash$dash$file
		singlepre="|\t"
		verdash="|"
		dash="-------"
		thisfile2=$thisfile2/$file
		thisfile=${thisfile2#/}

		if [ -d "$thisfile"  ];then
			recdir $(command ls $thisfile)
		fi
		thisfile2=${thisfile2%/*}
		thisfile=${thisfile%/*}
	done
	pre=${pre%"$singlepre"}
}



recdir $PWD
